/* Intentionally has zero specificity, so that to be able to override
the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */

:global(.theme-code-block-added-line) {
  background-color: var(--docusaurus-added-code-line-bg);
  display: block;
  padding: 0 var(--ifm-pre-padding) 0 42px;
  position: relative;
}
:global(.theme-code-block-added-line)::before {
  content: "+" !important;
  position: absolute;
  left: 8px;
  color: #47bb78;
}
:global(.theme-code-block-deleted-line) {
  background-color: var(--docusaurus-deleted-code-line-bg);
  display: block;
  padding: 0 var(--ifm-pre-padding) 0 42px;
  position: relative;
}
:global(.theme-code-block-deleted-line)::before {
  content: "-" !important;
  position: absolute;
  left: 8px;
  color: #e53e3e;
}

:global(.theme-code-block-edited-line) {
  background-color: var(--docusaurus-edited-code-line-bg);
  display: block;
  padding: 0 var(--ifm-pre-padding) 0 42px;
  position: relative;
}
:global(.theme-code-block-edited-line)::before {
  content: "✎" !important;
  position: absolute;
  left: 8px;
  color: #a0aec0;
}

:global(.theme-code-block-highlighted-line) {
  background-color: var(--docusaurus-highlighted-code-line-bg-dark);
  display: block;
  position: relative;
}

:root[data-theme="light"] :global(.theme-code-block-highlighted-line) {
  background-color: var(--docusaurus-highlighted-code-line-bg-light);
}

:global(.theme-code-block-stronger-line.theme-code-block-highlighted-line) {
  background-color: rgba(0, 0, 0, 0.15);
  display: block;
  position: relative;
}
:global(.theme-code-block-stronger-line.theme-code-block-added-line) {
  background-color: rgba(71, 187, 120, 0.3);
  display: block;
  position: relative;
}
:global(.theme-code-block-stronger-line.theme-code-block-deleted-line) {
  background-color: rgba(229, 62, 62, 0.3);
  display: block;
  position: relative;
}
:global(.theme-code-block-stronger-line.theme-code-block-edited-line) {
  background-color: rgba(10, 104, 255, 0.35);
  display: block;
  position: relative;
}

.codeLine {
  display: table-row;
  counter-increment: line-count;
  padding-left: 0;
}

.noLineNumbers {
  margin: 0 -16px 0 0;
}

.noLineNumbers {
  padding: 0 0 0 calc(var(--ifm-pre-padding)) !important;
  margin: 0;
}

.codeLineNumber {
  display: table-cell;
  text-align: right;
  width: min-content;
  left: 0;
  padding: 0 var(--ifm-pre-padding);
  overflow-wrap: normal;
}

.codeLineNumber::before {
  content: counter(line-count);
  opacity: 0.4;
}

:global(.theme-code-block-highlighted-line) .codeLineNumber::before {
  opacity: 0.8;
}

.codeLineContent {
  padding-right: var(--ifm-pre-padding);
}
.highlightedNumbers {
  margin: 0 !important;
  .codeHighlighted {
    margin-left: calc(var(--ifm-pre-padding) + 8.41px);
  }
}

:global(code:has(.theme-code-block-added-line, .theme-code-block-deleted-line, .theme-code-block-edited-line) > span) {
   padding-left: 32px !important;
 }